One or more aspects relate, in general, to processing within a computing environment, and in particular, to facilitating such processing.
Often, within a computing environment, a program needs to wait on asynchronous events to complete, which is performed by repeatedly testing for the conditions to be met. In one particular example, 128 conditions are tested in a continuous loop that tests whether a condition has been met. For instance, a number of conditions, such as three, are tested and then the processing loops back to the top to continue testing another set of conditions in a spin loop. The problem with this testing is that in certain environments, such as a multi-threaded environment, the thread executing the spin loop may be taking resources away from another thread in the multi-threaded environment trying to complete the work for which the first thread was testing.
Additionally, this affects thread balancing in that the waiting thread may be given priority when it is just spinning and waiting. It appears that many instructions are executing very fast, but in fact, no real work is getting done, and resources are being taken from the other thread. These resources include, for instance, instruction buffer or streaming buffer width, issue queue entries, store tags, mapper registers, general purpose registers, and issue queue slots.
Also, debug is difficult, since the spin loop typically takes up the last 256 instructions executed and leaves no instructions in the trace array of the other thread.